<template>
  <div>
    <!-- 搜索容器 -->
    <div class="search-container">
      <span class="search-label">行业：</span>
      <el-input v-model="input" placeholder="搜索行业" class="search-input"></el-input>

      <el-button type="primary" class="search-button">查询</el-button>
      <el-button type="success" class="search-button">重置</el-button>
      <el-button type="success" class="search-button">添加岗位</el-button>
    </div>

    <!-- 表格：四列均分宽度 -->
    <el-table :data="tableData" border style="width: 100%; margin-top: 15px;" :header-cell-style="{ textAlign: 'center' }"
      :cell-style="{ textAlign: 'center' }">
      <el-table-column prop="date" label="行业名称"></el-table-column>
    
      <el-table-column label="行业操作" width="180">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small">修改行业</el-button>
          <el-button type="text" size="small">删除行业</el-button>
        </template>
      </el-table-column>
    </el-table>

    <!-- 分页组件 -->
    <el-pagination class="pagination-left" background layout="prev, pager, next" :total="1000"></el-pagination>
  </div>
</template>

<script>
export default {
  methods: {
    handleClick(row) {
      console.log(row);
    }
  },
  data() {
    return {
      input: '',
      tableData: [{
        date: '企业A',
   
      }, {
        date: '企业B',
    
      }, {
        date: '企业C',
  
      }, {
        date: '企业D',

      }]
    }
  }
}
</script>

<style>
/* 搜索容器样式 */
.search-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
}

.search-label {
  white-space: nowrap;
  font-size: 14px;
  color: #606266;
}

.search-input {
  width: 200px;
}

.search-button {
  margin-left: 10px;
}

/* 表格样式 */

/* 最简单有效的表头高度设置 */
.el-table th {
  height: 70px !important;
  line-height: 70px !important;
}

.el-table {
  margin-top: 15px;
}

.el-table__header-wrapper th {
  background-color: #f5f7fa;
}

/* 分页样式 */
.pagination-left {
  margin-top: 15px;
  text-align: left;
}
</style>